home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / promode3.zip / PROMODEM.DOC < prev    next >
Text File  |  1993-01-06  |  24KB  |  815 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.      ProModem RS232 Interrupt Driven Serial Communication Library  v1.3
  23.  
  24.  
  25.                Written By Adrian J. Michaud
  26.  
  27.        (C) Interactive Telecommunication Systems 1992-1993
  28.  
  29.  
  30.  
  31.                Table Of Contents
  32.                -----------------
  33.  
  34.                                   Page
  35.  
  36. Introduction                                                    1
  37. Features/Supported Compilers                                    2
  38. Registration                                                    3
  39. Ording Form                                                     4
  40.  
  41. SetupControlBlock()                                             5
  42. OpenCom()                                                       6
  43. CloseCom()                                                      7
  44. SendCharacter()                                                 8
  45. CheckQueue()                                                    9
  46. GetCharacter()                                                  10
  47. ClearQueue()                                                    11
  48. GetCarrierDetect()                                              12
  49. SetBaudRate()                                                   13
  50. SetDTR()                                                        14
  51. DropDTR()                                                       15
  52. SetDataFormat()                                                 16
  53. SendString()                                                    17
  54. SetFIFOMode()                                                   18
  55. SetFIFOTriggerLevel()                                           19
  56. WaitForCharacter()                                              20
  57. DisableIRQ()                                                    21
  58. EnableIRQ()                                                     22
  59.  
  60. TERMINAL.C - Example Terminal Program source file               23
  61. BBS.C      - Example Bulletin Board source file                 24
  62.  
  63. If you are having trouble using ProModem                        25
  64.  
  65.  
  66.  
  67.   Page 1 - ProModem Users Manual         Interactive Telecommunication Systems
  68.  
  69.                 Introduction
  70.                 ------------
  71.  
  72.      ProModem is a High Performance Interrupt Driven RS232 serial
  73.    communication library that can be used for creating a Computerized
  74.    Bulletin Board System, a Terminal program, a RS232 Networking Driver,
  75.    or for RS232 Host to Host communications. ProModem supports the following
  76.    UARTS: PC16550C, NS16550AF, PC16550CF, 16450, and the 8250. ProModem takes
  77.    full advantage of a 16550 by enabling the 16 character FIFO to relieve
  78.    the CPU of excessive software overhead. When using a 16550, internal
  79.    FIFOs are activated allowing 16 bytes (plus 3 bits of error data per
  80.    byte in the RCVR FIFO) to be stored in both receive and transmit modes.
  81.    All the logic is on chip to minimize system overhead and maximize
  82.    system efficiency.
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.   Page 2 - ProModem Users Manual         Interactive Telecommunication Systems
  90.  
  91.                   Features
  92.                   --------
  93.  
  94.  
  95.    ProModem contains the following features:
  96.  
  97.    o Interrupt driven INPUT directly VIA 8259 Peripheral Interrupt Controller.
  98.    o Full 16550 FIFO support with selectable trigger levels.
  99.    o Supports user definable Base Addresses using IRQ3 or IRQ4.
  100.    o Automatic CTS/RTS Hardware Handshaking for Asynchronous Devices.
  101.    o Baud rates up to 115k bits per second.
  102.    o Handles unlimited Open Com Ports using IRQ3 and IRQ4.
  103.      (overruns might occur with slow CPU's or High Baud Rates of course).
  104.    o Supports both ISA (PC AT) and MCA (PS 2) machines
  105.    o Small, (Large, and Huge memory models available to registered users).
  106.  
  107.  
  108.              'C' Compilers Supported
  109.              -----------------------
  110.  
  111.    Microsoft C     - v5.1, v6.0, QuickC v2.5, and C/C++ v7.0
  112.    Borland TurboC  - v1.0, v2.0, v3.0, v3.1
  113.  
  114.  
  115.  
  116.   Page 3 - ProModem Users Manual         Interactive Telecommunication Systems
  117.  
  118.                  Registration
  119.                  ------------
  120.  
  121.      ProModem is not a public domain program and is not free.  ProModem is
  122.    Copyright (C) 1993 by Interactive Telecommunication Systems. Non-registered
  123.    users of this library are granted a limited one month license to ProModem
  124.    to evaluate the libraries suitability for their requirements.  Any usage of
  125.    ProModem beyond evaluation time period requires registration of each copy of
  126.    the library used.  Use of non-registered copies of ProModem beyond the
  127.    original evaluation period is prohibited.
  128.  
  129.      The Shareware version of ProModem has been built with a small model.
  130.    When you register ProModem you will receive FULL printed documentation
  131.    along with a LARGE and a HUGE library for all compilers supported.
  132.    Source code to all memory models for all supported compilers is
  133.    also part of the registration package.
  134.  
  135.      There are two ways to register. The first is by sending $25 to
  136.    Interactive Telecommunication Systems along with a registration form.
  137.    Non U.S. residents, please send checks drawn on U.S. funds. We will accept
  138.    non U.S. currency, but you must include an additional $5 (US) to cover
  139.    exchange handling. Also add $5 overseas shipping/handling. See the page 4
  140.    for the ordering form and ordering information.
  141.  
  142.  
  143.  
  144.   Page 4 - ProModem Users Manual         Interactive Telecommunication Systems
  145.  
  146.  
  147.               ProModem Ordering Form
  148.               ----------------------
  149.  
  150.      Please Remit To:      Eutecnics
  151.                C/O Adrian J. Michaud - ProModem!
  152.                30 Nagog Pk., Suite 105
  153.                Acton, Ma 01720
  154.  
  155.      Qty.    Description                                   Each     Total
  156.  
  157.      ____    ProModem Registration with 3.5" diskette    $25.00   ________
  158.          Includes ALL memory models with Source
  159.          Code and a printed Manual. MSC & TC.
  160.  
  161.      ____    ProModem Registration with 5.25" diskette   $25.00   ________
  162.          Includes ALL memory models with Source
  163.          Code and a printed Manual. MSC & TC.
  164.  
  165.     (U.S. orders add $2 shipping & handling)        Shipping   ________
  166.     (Foreign orders add $5 shipping)
  167.  
  168.     (Add $5 for Foreign Currency Exchange)     Misc. Charges   ________
  169.  
  170.     (MA residents please add 7.25% sales tax)            Tax   ________
  171.  
  172.                                TOTAL  $________
  173.  
  174.      Name: _________________________________________________________________
  175.  
  176.   Company: _________________________________________________________________
  177.  
  178.   Address: _________________________________________________________________
  179.  
  180.        _________________________________________________________________
  181.  
  182.        _________________________________________________________________
  183.  
  184.  Where did you obtain ProModem? ( ) Friend   ( ) Shareware House   ( ) Other
  185.                 ( ) BBS      ( ) User Group       __________
  186.  
  187. All checks or money orders must be drawn on U.S. Funds in U.S. Dollars.
  188. Sorry, no C.O.D. orders will be accepted.
  189.  
  190.   Make All Checks Payable to:  Interactive Telecommunication Systems
  191.  
  192.  
  193.  
  194.   Page 5 - ProModem Users Manual         Interactive Telecommunication Systems
  195.  
  196.  
  197.   Function: int SetupControlBlock(AJMS *controlBlock,
  198.                   unsigned int baseAddress,
  199.                   int irq,
  200.                   unsigned int bufferSize);
  201.  
  202.   Description: Sets up a control block for a specific com port and IRQ
  203.            number. This is the first function that is always used when
  204.            preparing to communicate to a COM port. Each com port that
  205.            will be opened requires a different control block.
  206.  
  207.   Return Value: SUCCESSFUL    - Setup was successful.
  208.         TOO_MANY_IRQS - Too many mounted com ports.
  209.  
  210.   Example Usage:
  211.  
  212.   #include "promodem.h"
  213.   main()
  214.   {
  215.   AJMS controlBlock;
  216.  
  217.   /* This sets up a control block for COM1 (0x3f8), IRQ4, and a
  218.      4096 Byte receive Buffer.
  219.   */
  220.  
  221.   SetupControlBlock(&controlBlock , 0x3f8 , 4 , 4096);/*Init Control Block*/
  222.   OpenCom(&controlBlock);                             /*Open COM port     */
  223.   }
  224.  
  225.  
  226.  
  227.  
  228.  
  229.   Page 6 - ProModem Users Manual         Interactive Telecommunication Systems
  230.  
  231.  
  232.   Function: int OpenCom(AJMS *controlBlock);
  233.  
  234.   Description: Opens a COM port for communication. This function allocates
  235.            an IRQ buffer and sets up the UART for communication.
  236.  
  237.   Return Value: BUFFER_ALLOCATION_ERROR - Could not allocate IRQ buffer.
  238.         COM_ALREADY_OPEN        - Port is already open and ready.
  239.         SUCCESSFUL              - COM port successfully opened.
  240.  
  241.   Example Usage:
  242.  
  243.   #include "promodem.h"
  244.   example()
  245.   {
  246.   extern AJMS controlBlock; /* Assumes a control block has previously  */
  247.                 /* been set up.                            */
  248.  
  249.   OpenCom(&controlBlock);   /* Open COM port */
  250.   }
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.   Page 7 - ProModem Users Manual         Interactive Telecommunication Systems
  258.  
  259.  
  260.   Function: int CloseCom(AJMS *controlBlock);
  261.  
  262.   Description: Closes a previously opened COM port. This de-allocates the
  263.            IRQ buffer that was allocated by OpenCom() and restores
  264.            the UART to its previous state before it was opened.
  265.  
  266.   Return Value: COM_PORT_NOT_OPEN - COM port was not previously Opened.
  267.         SUCCESSFUL        - COM port successfully closed and IRQ
  268.                     buffer has been de-allocated.
  269.  
  270.   Example Usage:
  271.  
  272.   #include "promodem.h"
  273.   example()
  274.   {
  275.   extern AJMS controlBlock; /* Assumes a control block has previously  */
  276.                 /* been set up and the COM port is OPEN    */
  277.  
  278.   CloseCom(&controlBlock);   /*Close COM port */
  279.   }
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.   Page 8 - ProModem Users Manual         Interactive Telecommunication Systems
  287.  
  288.  
  289.   Function: int SendCharacter(AJMS *controlBlock, unsigned char ch);
  290.  
  291.   Description: Sends a character to the COM port.
  292.  
  293.   Return Value: CARRIER    - If there is a carrier.
  294.         NO_CARRIER - If there isn't a carrier.
  295.  
  296.   Also see: SendString()
  297.  
  298.   Example Usage:
  299.  
  300.   #include "promodem.h"
  301.   example()
  302.   {
  303.   unsigned char ch;         /* Allocate ch on the stack */
  304.  
  305.   extern AJMS controlBlock; /* Assumes a control block has previously  */
  306.                 /* been set up and the COM port is OPEN    */
  307.  
  308.   ch = (unsigned char)getch();      /* Get a character from the keyboard */
  309.   SendCharacter(&controlBlock, ch); /* Send character to COM port        */
  310.   }
  311.  
  312.  
  313.  
  314.  
  315.   Page 9 - ProModem Users Manual         Interactive Telecommunication Systems
  316.  
  317.  
  318.   Function: int CheckQueue(AJMS *controlBlock);
  319.  
  320.   Description: Checks the status of the IRQ receive buffer.
  321.  
  322.   Return Value: CHARACTERS_WAITING - If there are characters in queue.
  323.         QUEUE_EMPTY        - If queue is empty.
  324.  
  325.   Also see: GetCharacter(), ClearQueue(), WaitForCharacter()
  326.  
  327.   Example Usage:
  328.  
  329.   #include "promodem.h"
  330.   example()
  331.   {
  332.   extern AJMS controlBlock; /* Assumes a control block has previously */
  333.                 /* been set up and the COM port is OPEN   */
  334.  
  335.   if (CheckQueue(&controlBlock) == CHARACTERS_WAITING) /* Check Queue     */
  336.   printf("%c", GetCharacter(&controlBlock)); /* Print one byte from Queue */
  337.   }
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.   Page 10 - ProModem Users Manual        Interactive Telecommunication Systems
  345.  
  346.  
  347.   Function: int GetCharacter(AJMS *controlBlock);
  348.  
  349.   Description: Gets a single character from Receive IRQ Queue.
  350.  
  351.   Return Value: First Character that was placed in the receive Queue.
  352.         The receive queue expands as more characters are
  353.         received. GetCharacter() takes the first character
  354.         from the queue and returns it as an (int) with the
  355.         high byte masked.
  356.  
  357.   Also see: CheckQueue()
  358.  
  359.   Example Usage:
  360.  
  361.   #include "promodem.h"
  362.   example()
  363.   {
  364.   extern AJMS controlBlock; /* Assumes a control block has previously */
  365.                 /* been set up and the COM port is OPEN   */
  366.  
  367.   if (CheckQueue(&controlBlock) == CHARACTERS_WAITING) /* Check Queue     */
  368.   printf("%c", GetCharacter(&controlBlock)); /* Print one byte from Queue */
  369.   }
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.   Page 11 - ProModem Users Manual        Interactive Telecommunication Systems
  377.  
  378.  
  379.   Function: void ClearQueue(AJMS *controlBlock);
  380.  
  381.   Description: Clears the contents of the Receive IRQ Queue.
  382.            This insures that there are no pending characters
  383.            in the Receive IRQ Queue.
  384.  
  385.   Return Value: None.
  386.  
  387.   Also see: CheckQueue()
  388.  
  389.   Example Usage:
  390.  
  391.   #include "promodem.h"
  392.   example()
  393.   {
  394.   extern AJMS controlBlock; /* Assumes a control block has previously */
  395.                 /* been set up and the COM port is OPEN   */
  396.  
  397.   ClearQueue(&controlBlock); /* Clears the Receive IRQ Queue */
  398.   }
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.   Page 12 - ProModem Users Manual        Interactive Telecommunication Systems
  406.  
  407.  
  408.   Function: int GetCarrierDetect(AJMS *controlBlock);
  409.  
  410.   Description: Checks the status of the DCD (Data Carrier Detect) line
  411.            on the serial port. This is used to detect if a modem
  412.            has a carrier or not.
  413.  
  414.   Return Value: CARRIER    - If there is a carrier.
  415.         NO_CARRIER - If there isn't a carrier.
  416.  
  417.   Example Usage:
  418.  
  419.   #include "promodem.h"
  420.   example()
  421.   {
  422.   extern AJMS controlBlock; /* Assumes a control block has previously */
  423.                 /* been set up and the COM port is OPEN   */
  424.  
  425.   if (GetCarrierDetect(&controlBlock) == NO_CARRIER) /* Check DCD */
  426.   printf("\nThere is no Carrier\n"); /* Display Loss of Carrier.  */
  427.   }
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.   Page 13 - ProModem Users Manual        Interactive Telecommunication Systems
  435.  
  436.  
  437.   Function: void SetBaudRate(AJMS *controlBlock, unsigned long baudRate);
  438.  
  439.   Description: Sets up the baud rate for the serial port.
  440.  
  441.   Return Value: None.
  442.  
  443.   Example Usage:
  444.  
  445.   #include "promodem.h"
  446.   example()
  447.   {
  448.   extern AJMS controlBlock; /* Assumes a control block has previously */
  449.                 /* been set up and the COM port is OPEN   */
  450.  
  451.   SetBaudRate(&controlBlock, (unsigned long)38400); /* set to 38.4k Baud */
  452.   }
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.   Page 14 - ProModem Users Manual        Interactive Telecommunication Systems
  460.  
  461.  
  462.   Function: void SetDTR(AJMS *controlBlock);
  463.  
  464.   Description: Turns ON the DTR (Data Terminal Ready) line on the
  465.            serial port. OpenCom() automaticly turns on DTR
  466.            when a COM port is initially opened. DTR needs to
  467.            be turned on to talk to a modem.
  468.  
  469.   Return Value: None.
  470.  
  471.   Also see: DropDTR()
  472.  
  473.   Example Usage:
  474.  
  475.   #include "promodem.h"
  476.   example()
  477.   {
  478.   extern AJMS controlBlock; /* Assumes a control block has previously */
  479.                 /* been set up and the COM port is OPEN   */
  480.  
  481.   SetDTR(&controlBlock); /* Turns on DTR (Data Terminal Ready) */
  482.   }
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.   Page 15 - ProModem Users Manual        Interactive Telecommunication Systems
  490.  
  491.  
  492.   Function: void DropDTR(AJMS *controlBlock);
  493.  
  494.   Description: Turns OFF the DTR (Data Terminal Ready) line on the
  495.            serial port. CloseCom() does NOT automatically turn
  496.            OFF DTR. Some modems when set up correctly will
  497.            drop carrier when DTR is toggled from ON->OFF->ON.
  498.            Your modem manual will explain more about this
  499.            and how to set up your modem to respond to DTR.
  500.  
  501.   Return Value: None.
  502.  
  503.   Also see: SetDTR()
  504.  
  505.   Example Usage:
  506.  
  507.   #include "promodem.h"
  508.   example()
  509.   {
  510.   extern AJMS controlBlock; /* Assumes a control block has previously */
  511.                 /* been set up and the COM port is OPEN   */
  512.  
  513.   DropDTR(&controlBlock); /* Turns off DTR (Data Terminal Ready) */
  514.   }
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.   Page 16 - ProModem Users Manual        Interactive Telecommunication Systems
  522.  
  523.  
  524.   Function: void SetDataFormat(AJMS *controlBlock, int options);
  525.  
  526.   Description: Sets the Data format for a COM port. OpenCom()
  527.            automatically sets the COM port to 8 Bits, 1 stop,
  528.            no parity. To override this, use this function.
  529.  
  530.   Return Value: None.
  531.  
  532.   Example Usage:
  533.  
  534.   /* BITS_7       - Sets COM port for 7 bits                */
  535.   /* BITS_6       - Sets COM port for 6 bits                */
  536.   /* BITS_7       - Sets COM port for 7 bits                */
  537.   /* BITS_8       - Sets COM port for 8 bits                */
  538.   /* STOP_BITS_1  - Sets COM port for 1 stop bit            */
  539.   /* STOP_BITS_2  - Sets COM port for 2 stop bits           */
  540.   /* PARITY_ON    - Sets COM port to use parity             */
  541.   /* NO_PARITY    - Sets COM port not to use a parity bit   */
  542.   /* EVEN_PARITY  - Sets COM port to use even parity        */
  543.   /* ODD_PARITY   - Sets COM port to use odd parity         */
  544.   /* STICK_PARITY - Sets COM port to use stick parity       */
  545.   /* SET_BREAK    - Sets COM port to set break              */
  546.  
  547.   #include "promodem.h"
  548.   example()
  549.   {
  550.   extern AJMS controlBlock; /* Assumes a control block has previously  */
  551.                 /* been set up and the COM port is OPEN    */
  552.  
  553.     /* Sets COM port for 8-N-1, simply Bitwise OR anything you want. */
  554.   SetDataFormat(&controlBlock, BIT_8 | NO_PARITY | STOP_BITS1);
  555.   }
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.   Page 17 - ProModem Users Manual        Interactive Telecommunication Systems
  563.  
  564.  
  565.   Function: int SendString(AJMS *controlBlock, char *string);
  566.  
  567.   Description: Sends a NULL terminated string to the COM port.
  568.  
  569.   Return Value: CARRIER    - If there was a carrier while sending string.
  570.         NO_CARRIER - If there wasn't a carrier while sending string.
  571.  
  572.   Also see: SendCharacter()
  573.  
  574.   Example Usage:
  575.  
  576.   #include "promodem.h"
  577.   example()
  578.   {
  579.   extern AJMS controlBlock; /* Assumes a control block has previously  */
  580.                 /* been set up and the COM port is OPEN    */
  581.  
  582.   SendString(&controlBlock, "\nHello World!"); /* Send string to COM port */
  583.   }
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.   Page 18 - ProModem Users Manual        Interactive Telecommunication Systems
  591.  
  592.  
  593.   Function: SetFIFOMode(AJMS *controlBlock);
  594.  
  595.   Description: Turns on the FIFO buffer for a COM port. This will only
  596.            work with a UART 16550.
  597.  
  598.   Return Value: FIFO_ENABLED    - The FIFO has been enabled.
  599.         NO_FIFO_PRESENT - No FIFO present (16550 Uarts ONLY)
  600.  
  601.   Also see: SetFIFOTriggerLevel()
  602.  
  603.   Example Usage:
  604.  
  605.   #include "promodem.h"
  606.   example()
  607.   {
  608.   extern AJMS controlBlock; /* Assumes a control block has previously  */
  609.                 /* been set up and the COM port is OPEN    */
  610.  
  611.     /* Try to enable the FIFO */
  612.   if (SetFIFOMode(&controlBlock)==FIFO_ENABLED)
  613.      printf("\nFIFO has been enabled.");
  614.   else
  615.      printf("\nNo FIFO Present, not a 16550.");
  616.   }
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.   Page 19 - ProModem Users Manual        Interactive Telecommunication Systems
  624.  
  625.  
  626.   Function: SetFIFOTriggerLevel(AJMS *controlBlock, unsigned char mode);
  627.  
  628.   Description: Sets the FIFO trigger level for the RCVR FIFO Interrupt.
  629.            This only works with a UART 16550.
  630.  
  631.   Return Value: None.
  632.  
  633.   Also see: SetFIFOMode()
  634.  
  635.   Example Usage:
  636.  
  637.   /* FIFO_1_TRIGGER  - IRQ will trigger with 1 byte in FIFO buffer   */
  638.   /* FIFO_4_TRIGGER  - IRQ will trigger with 4 bytes in FIFO buffer  */
  639.   /* FIFO_8_TRIGGER  - IRQ will trigger with 8 bytes in FIFO buffer  */
  640.   /* FIFO_16_TRIGGER - IRQ will trigger with 16 bytes in FIFO buffer */
  641.  
  642.   #include "promodem.h"
  643.   example()
  644.   {
  645.   extern AJMS controlBlock; /* Assumes a control block has previously  */
  646.                 /* been set up and the COM port is OPEN    */
  647.  
  648.     /* Sets FIFO to trigger on 16 characters in RCVR buffer */
  649.   SetFIFOTriggerLevel(&controlBlock, FIFO_16_TRIGGER);
  650.   }
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.   Page 20 - ProModem Users Manual        Interactive Telecommunication Systems
  658.  
  659.  
  660.   Function: int WaitForCharacter(AJMS *controlBlock, double seconds);
  661.  
  662.   Description: Waits for a character to be received in the IRQ receive
  663.            queue for a specified number of seconds.
  664.  
  665.   Return Value: (int)         - Character received (high byte masked)
  666.         WAIT_TIME_OUT - Time out, no character received.
  667.  
  668.   Also see: GetCharacter()
  669.  
  670.   Example Usage:
  671.  
  672.   #include "promodem.h"
  673.   example()
  674.   {
  675.   unsigned char ch;
  676.  
  677.   extern AJMS controlBlock; /* Assumes a control block has previously */
  678.                 /* been set up and the COM port is OPEN   */
  679.  
  680.    /* wait 3.5 seconds for a character, or timeout */
  681.   ch = WaitForCharacter(&controlBlock, 3.50);
  682.   if (ch==WAIT_TIME_OUT)
  683.     printf("\nTimeout, no character received.\n");
  684.   else
  685.     printf("\nHere is the character '%c'\n", ch);
  686.   }
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.   Page 21 - ProModem Users Manual        Interactive Telecommunication Systems
  695.  
  696.  
  697.   Function: DisableIRQ(AJMS *controlBlock);
  698.  
  699.   Description: Turns OFF the IRQ vector and restores it to the
  700.            original vector before the com port was opened.
  701.            This should ALWAYS be done if you are doing any spawning
  702.            that swaps your program to Disk or EMS.
  703.  
  704.   Return Value: None.
  705.  
  706.   Also see: EnableIRQ()
  707.  
  708.   Example Usage:
  709.  
  710.   #include "promodem.h"
  711.   example()
  712.   {
  713.   extern AJMS controlBlock; /* Assumes a control block has previously */
  714.                 /* been set up and the COM port is OPEN   */
  715.  
  716.   DisableIRQ(&controlBlock); /* Restores IRQ vector to original  */
  717.   }
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.   Page 22 - ProModem Users Manual        Interactive Telecommunication Systems
  725.  
  726.  
  727.   Function: EnableIRQ(AJMS *controlBlock);
  728.  
  729.   Description: Sets up the IRQ vector to point to ProModem's serial
  730.            receive IRQ internal routine. This should only be used
  731.            if DisableIRQ() was previously called. OpenCom()
  732.            automatically sets up the IRQ vector when the com port
  733.            is originally opened.
  734.  
  735.   Return Value: None.
  736.  
  737.   Also see: DisableIRQ()
  738.  
  739.   Example Usage:
  740.  
  741.   #include "promodem.h"
  742.   example()
  743.   {
  744.   extern AJMS controlBlock; /* Assumes a control block has previously */
  745.                 /* been set up and the COM port is OPEN    */
  746.  
  747.   EnableIRQ(&controlBlock); /* Sets IRQ vector to point to ProModem's IRQ */
  748.   }
  749.  
  750.  
  751.  
  752.  
  753.   Page 23 - ProModem Users Manual        Interactive Telecommunication Systems
  754.  
  755.   TERMINAL.C - Example terminal program using ProModem.
  756.  
  757.   TERMINAL.C is a demo program written using the routines in the
  758.   ProModem library to demonstrate the library functions.
  759.  
  760.   To build the program you need to have the PROMODEM.H file that came in
  761.   the archive and the PROM_TC.LIB or PROM_MSC.LIB to link with.
  762.   Once you have the correct LIBs and .H files in your INCLUDE and
  763.   LIB directories, compile and link:
  764.  
  765.   nmake PROMODEM.MAK                   ;Microsoft QuickC
  766.   cl terminal.c /link PROM_MSC.LIB     ;Microsoft C
  767.   tcc terminal.c PROM_TC.LIB           ;Turbo C
  768.  
  769.   TERMINAL.C is yours to do what you want with.
  770.  
  771.   NOTE: With Microsoft compilers, you must <<TURN OFF>> the DEBUG flag
  772.     if it is set.
  773.  
  774.  
  775.  
  776.   Page 24 - ProModem Users Manual        Interactive Telecommunication Systems
  777.  
  778.   BBS.C - Example Bulletin Board System using ProModem.
  779.  
  780.   BBS.C is a demo BBS program written using the routines in the
  781.   ProModem library to demonstrate the library functions.
  782.  
  783.   To build the program you need to have the PROMODEM.H file that came in
  784.   the archive and the PROM_TC.LIB or PROM_MSC.LIB to link with.
  785.   Once you have the correct LIBs and .H files in your INCLUDE and
  786.   LIB directories, compile and link:
  787.  
  788.   nmake BBS.MAK                   ;Microsoft QuickC
  789.   cl bbs.c /link PROM_MSC.LIB     ;Microsoft C
  790.   tcc bbs.c PROM_TC.LIB           ;Turbo C
  791.  
  792.   BBS.C is yours to do what you want with.
  793.  
  794.   NOTE: With Microsoft compilers, you must <<TURN OFF>> the DEBUG flag
  795.     if it is set.
  796.  
  797.  
  798.  
  799.  
  800.   Page 25 - ProModem Users Manual        Interactive Telecommunication Systems
  801.  
  802.                       Having Problems with ProModem?
  803.                       ------------------------------
  804.  
  805.   The original ProModem version 1.0 had a CTS/RTS bug that has now been 
  806.   fixed with version 1.3.  Version 1.3 is the latest version as of 1/6/92.
  807.  
  808.   If you are having trouble getting ProModem to work, or have any questions
  809.   about ProModem, please feel free to call my BBS (written using ProModem)
  810.   at 617-581-1039 (2400 - 14,400 Baud) HST/V.32bis. Leave a message
  811.   stating that you are a ProModem user and would like support. You will then
  812.   be granted an account.
  813.   
  814.   I can be reached voice at 617-595-8912 after 8:00 PM EST.
  815.